package com.company;

import com.util.Util;

import java.awt.Point;

class Fishing {

    void start(){
        //获取窗口锚点
        Point anchor = new Finder().findAnchor();

        //计算监控点
        int mx = anchor.x + 1014;
        int my = anchor.y + 590;

        //监控器
        Monitor monitor = new Monitor();

        //计数器
        int count = 1;

        //无限循环
        //noinspection InfiniteLoopStatement
        while (true) {
            //检查是否有鱼上钩
            monitor.waitBite(mx, my);
            System.out.println(">");
            System.out.print(count + "鱼上钩..");

            System.out.print("收杆..");
            RB.rightClick();

            System.out.print("等..");
            Util.sleep(1500L);

            System.out.print("出杆.");
            RB.rightClick();
            Util.sleep(1500L);

            count++;
        }
    }


}
